package com.machine.action.admin;

import javax.annotation.Resource;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import com.machine.dao.user.UserDao;
import com.opensymphony.xwork2.ActionSupport;

@Component("deleteAds")
@Scope("prototype")
public class DeleteAds extends ActionSupport {

	private static final long serialVersionUID = 1L;

	private String id;
	private UserDao userDao;
	
	@Override
	public String execute() throws Exception {
		userDao.deleteAds(id);
		return SUCCESS;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public UserDao getUserDao() {
		return userDao;
	}

	@Resource
	public void setUserDao(UserDao userDao) {
		this.userDao = userDao;
	}
}
